/**
 * Creat with IntelliJ IDEA
 * Description
 * User: mamba24
 * Date: 2022-04-01
 * Time: 23:29
 * To BE A Better Person-2020-3-2
 */
//学生成绩登记
//我来水代码了
//第二天水代码
class Student{
    private int id;
    private String name;

    public Student(int id,String name) {
        this.id = id;
        this.name = name;
    }

    @Override
    public String toString() {
        return "Student{" +
                "id=" + id +
                ", name='" + name + '\'' +
                '}';
    }
    class subject{
        public String Chinese;
        public String Math;
        public String English;
        private int C_score;
        private int M_score;
        private int E_score;

        public subject(int C_score,int M_score,int E_score) {
            this.C_score=C_score;
            this.M_score=M_score;
            this.E_score=E_score;
        }
        public void printf_score(){
            //注意这个Student.this.name是调用外部的属性
            System.out.print("Name:"+Student.this.name+"\n"+
                    "ID:"+Student.this.id+"\n"+
                    "Chinese:"+this.C_score+"\n"+
                    "Math:"+this.M_score+"\n"+
                    "English"+this.E_score
            );
        }
    }
}
public class TestDemo {
    public static void main(String[] args) {
        Student s1=new Student(36,"krik");
        System.out.println(s1);
        Student.subject sub1=s1.new subject(99,65,98);
        sub1.printf_score();
    }

}
